// JavaScript Document
(function () {
    function k(a, b, d, g, c, f) {
        function h() {
            var a = new Date - l;
            a >= o ? (j(g), c && c()) : (j((g - d) * (a / o) + d), x(h))
        }
        var o = f || 800,
            i = a.style,
            l = new Date,
            j;
        j = "opacity" !== b ? function (a) {
            i[b] = Math.round(a) + "px"
        } : p ? function (a) {
            i.opacity = a + ""
        } : function (a) {
            i.filter = "alpha(opacity=" + Math.round(100 * a) + ")"
        };
        j(Math.max(d, 1));
        x(h)
    }

    function E(a, b) {
        var d = {
            timer: -1,
            canceled: !1,
            done: !1,
            cancel: function () {
                clearTimeout(this.timer);
                this.canceled = !0
            }
        };
        d.timer = setTimeout(function () {
            d.done = !0;
            a()
        }, b);
        return d
    }

    function y(a) {
        var a =
            a || window.event,
            b = a.srcElement || a.target;
        "mouseover" === a.type || "mouseenter" === a.type ? r(b, "hover") : s(b, "hover");
        t(b)
    }

    function F(a) {
        a.slotWidth = a.width;
        a.slotHeight = a.height;
        var b = [],
            b = b instanceof Array ? b : [b],
            d = a.id,
            g = l.createElement("ins"),
            e = g.style,
            f = 0,
            h = b.length,
            o = {
                margin: 0,
                padding: 0,
                border: "none",
                "background-color": "transparent",
                "background-image": "none",
                left: 0,
                top: 0,
                textAlign: "left",
                wordWrap: "normal",
                display: "block",
                "float": "none",
                visibility: "visible",
                outline: "none",
                verticalAlign: "baseline",
                opacity: 1,
                whiteSpace: "normal",
                textIndent: 0,
                clear: "none"
            }, m = g.style,
            k;
        for (k in o) o.hasOwnProperty(k) && (m[k] = o[k]);
        g.id = "baidu_clb_wrapper_" + d;
        g.setAttribute(G, d);
        g.setAttribute(H, "slide");
        e.display = "block";
        e.overflow = "hidden";
        e.position = "relative";
        e.textDecoration = "none";
        e.zIndex = u;
        a.slotWidth && (e.width = a.slotWidth + "px");
        a.slotHeight && (e.height = a.slotHeight + "px");
        for (; f < h; f++) g.appendChild(b[f]);
        i = g;
        i.style.zIndex = u - 1;
        a = document.createElement("div");
        a.style.position = "absolute";
        a.style.right = 0;
        a.style.bottom =
            "5px";
        a.style.zIndex = u - 1;
        a.style.overflow = "hidden";
        for (b = 0; b < j.length; b++) d = g = j[b], e = document.createElement("div"), f = e.style, f.width = c.width + "px", f.height = c.height + "px", f.overflow = "hidden", f.position = "absolute", f.backgroundColor = "#ffffff", f.top = 0, p ? f.opacity = 1 : (f.filter = "alpha(opacity=100)", f.zoom = 1), e.innerHTML = '<a href="' + d.targetUrl + '" target="' + z[d.targetWindow] + '"><img src="' + d.src + '" alt="" style="display: block; border: 0;" /></a>', d = e, e = g, f = b + 1, g = document.createElement("a"), g.href = e.targetUrl,
        g.target = z[e.targetWindow], g.innerHTML = f + "", g.setAttribute("data-index", f + ""), e = g, f = e.style, f.position = "relative", f.overflow = "hidden", f.width = "20px", f.height = "20px", f["cssFloat" in f ? "cssFloat" : "styleFloat"] = "left", f.marginRight = "5px", f.display = "block", f.textAlign = "center", f.lineHeight = "20px", f.fontSize = "14px", f.color = "#f00", f.cursor = "pointer", f.textDecoration = "none", "circle" === c.backgroundShape ? v ? (f.backgroundColor = c.defaultBackgroundColor, f.borderRadius = "50%") : e.innerHTML += '<vml:oval style="z-index: -1; position: absolute; width: 19px; height: 19px; behavior: url(#default#VML); top: 0px; left: 0px" fillcolor="' +
            c.defaultBackgroundColor + '" stroked="no"></vml:oval>' : f.backgroundColor = c.defaultBackgroundColor, q(g, "mouseenter", I), q(g, "mouseenter", y), q(g, "mouseleave", A), q(g, "mouseleave", y), d.style.zIndex = j.length - b, i.appendChild(d), a.appendChild(g);
        i.appendChild(a);
        a = document.getElementsByTagName("script");
        a = a[a.length - 1];
        a.parentNode.insertBefore(i, a);
        n(!0)
    }

    function B(a, b) {
        if ("circle" === c.backgroundShape && !v) {
            var d = a.getElementsByTagName("oval")[0];
            d && (d.fillColor = b)
        } else a.style.backgroundColor = b
    }

    function t(a) {
        C(a,
            "active") || C(a, "hover") ? (B(a, c.hoverBackgroundColor), a.style.color = c.hoverColor) : (B(a, c.defaultBackgroundColor), a.style.color = c.defaultColor)
    }

    function n(a) {
        function b(a) {
            var b = i.childNodes[a],
                e = g.childNodes[a];
            b.style.width = c.width + "px";
            b.style.height = c.height + "px";
            p ? b.style.opacity = 1 : b.style.filter = "alpha(opacity=100)";
            b.style.zIndex = d;
            a === h ? r(e, "active") : s(e, "active");
            t(e);
            d--
        }
        h >= j.length && (h = 0);
        var d = j.length,
            g = i.lastChild,
            e;
        for (e = h; e < j.length; e++) b(e);
        for (e = 0; e < h; e++) b(e);
        !1 !== a && A()
    }

    function I(a) {
        var a =
            a || window.event,
            b = a.srcElement || a.target;
        w = E(function () {
            clearTimeout(m);
            m = -1;
            h = parseInt(b.innerHTML, 10) - 1;
            n(!1)
        }, 250)
    }

    function A() {
        0 > m && (m = setTimeout(J, 1E3 * c.interval));
        w && w.cancel()
    }

    function J() {
        clearTimeout(m);
        m = -1;
        var a = i.childNodes[h];
        h + 1 >= j.length ? h = 0 : h++;
        for (var b = i.lastChild.childNodes, d = 0; d < b.length; d++) {
            var g = b[d];
            d === h ? r(g, "active") : s(g, "active");
            t(b[d])
        }
        switch (c.effect) {
        case "left":
            k(a, "width", c.width, 0, n);
            break;
        case "top":
            k(a, "height", c.height, 0, n);
            break;
        case "alpha":
            k(a, "opacity", 1, 0,
                n);
            break;
        case "bottom":
            k(a, "top", 0, c.height, n);
            break;
        case "right":
            k(a, "left", 0, c.width, n)
        }
    }
    var c = window.BAIDU_CLB_SLOT_OPTIONS;
    if (c) {
        c.id = "ad_" + +new Date;
        var l = document,
            D = l.body,
            p, v, u = 2147483647,
            G = "data-baidu-clb-id",
            H = "data-baidu-clb-type";
        (function () {
            var a = l.createElement("div"),
                b = l.createElement("div");
            a.style.position = "absolute";
            a.style.top = "200px";
            b.style.position = "fixed";
            b.style.top = "100px";
            a.appendChild(b);
            D.appendChild(a);
            b.getBoundingClientRect && (b.getBoundingClientRect(), a.getBoundingClientRect());
            D.removeChild(a)
        })();
        (function () {
            var a = l.createElement("object");
            "classid" in a && (a.setAttribute("test", "test"), a.getAttribute("test"))
        })();
        (function () {
            var a = l.createElement("div");
            a.innerHTML = '<div style="opacity:.25;"></div>';
            p = "0.25" == a.firstChild.style.opacity
        })();
        (function () {
            var a = l.createElement("div");
            a.style.borderRadius = "5px";
            v = !! a.style.borderTopLeftRadius
        })();
        var x = window.requestAnimationFrame || window.webktiRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame ||
            window.msRequestAnimationFrame || function (a) {
                setTimeout(a, 1 / 60)
            }, z = ["_self", "_blank"],
            q = window.addEventListener ? function (a, b, d) {
                switch (b) {
                case "mouseenter":
                    a.addEventListener("mouseover", d, !0);
                    break;
                case "mouseleave":
                    a.addEventListener("mouseout", d, !0);
                    break;
                default:
                    a.addEventListener(b, d, !1)
                }
            } : function (a, b, d) {
                a.attachEvent("on" + b, d)
            }, r = document.body.classList ? function (a, b) {
                a.classList.add(b)
            } : function (a, b) {
                for (var d = a.className.split(" "), c = 0; c < d.length; c++)
                    if (d[c] === b) return;
                d.push(b);
                a.className =
                    d.join(" ")
            }, s = document.body.classList ? function (a, b) {
                a.classList.remove(b)
            } : function (a, b) {
                for (var d = a.className.split(" "), c = !1, e = 0; e < d.length; e++)
                    if (d[e] === b) {
                        c = !0;
                        d.splice(e, 1);
                        break
                    }
                c && (a.className = d.join(" "))
            }, C = document.body.classList ? function (a, b) {
                return a.classList.contains(b)
            } : function (a, b) {
                for (var c = a.className.split(" "), g = 0; g < c.length; g++)
                    if (c[g] === b) return !0;
                return !1
            }, j = c.materials,
            h = 0,
            i, m = -1,
            w;
        c.version || (c.backgroundShape = "rect", c.defaultBackgroundColor = "fff", c.hoverBackgroundColor =
            "f00", c.defaultColor = "f00", c.hoverColor = "fff");
        c.defaultBackgroundColor = "#" + c.defaultBackgroundColor;
        c.hoverBackgroundColor = "#" + c.hoverBackgroundColor;
        c.defaultColor = "#" + c.defaultColor;
        c.hoverColor = "#" + c.hoverColor;
        c && (F(c), window.BAIDU_CLB_SLOT_OPTIONS = void 0)
    }
})();